package com.zp.mvppractice.beans;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Created by izp on 2017/5/15.
 */

public class User implements Serializable, Parcelable {
    /**
     * leadername :
     * cpid : 52
     * mobile : 18623549649
     * token : B084O39rDAqcXybWQRwJ
     * role : 1
     * cpname : 北京数云互联科技有限公司
     * cpverified : 2
     * nickname : 张鹏
     * id : 96
     * settingdays : 96
     */

    private String leadername;
    private long id;
    private long cpid;
    private String mobile;
    private int role;
    private String cpname;
    private int cpverified;
    private String nickname;
    private int settingdays;
    private String token;




    public String getLeadername() {
        return leadername;
    }

    public User setLeadername(String leadername) {
        this.leadername = leadername;
        return this;
    }

    public long getCpid() {
        return cpid;
    }

    public User setCpid(long cpid) {
        this.cpid = cpid;
        return this;
    }


    public String getMobile() {
        return mobile;
    }

    public User setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public String getToken() {
        return token;
    }

    public User setToken(String token) {
        this.token = token;
        return this;
    }

    public int getRole() {
        return role;
    }

    public User setRole(int role) {
        this.role = role;
        return this;
    }

    public String getCpname() {
        return cpname;
    }

    public User setCpname(String cpname) {
        this.cpname = cpname;
        return this;
    }

    public int getCpverified() {
        return cpverified;
    }

    public User setCpverified(int cpverified) {
        this.cpverified = cpverified;
        return this;
    }

    public String getNickname() {
        return nickname;
    }

    public User setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public long getId() {
        return id;
    }
    public User setId(long id) {
        this.id = id;
        return this;
    }

    public int getSettingdays() {
        return settingdays;
    }

    public User setSettingdays(int settingdays) {
        this.settingdays = settingdays;
        return this;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.leadername);
        dest.writeLong(this.cpid);
        dest.writeString(this.mobile);
        dest.writeString(this.token);
        dest.writeInt(this.role);
        dest.writeString(this.cpname);
        dest.writeInt(this.cpverified);
        dest.writeString(this.nickname);
        dest.writeLong(this.id);
        dest.writeInt(this.settingdays);
    }

    public User() {
    }

    protected User(Parcel in) {
        this.leadername = in.readString();
        this.cpid = in.readLong();
        this.mobile = in.readString();
        this.token = in.readString();
        this.role = in.readInt();
        this.cpname = in.readString();
        this.cpverified = in.readInt();
        this.nickname = in.readString();
        this.id = in.readLong();
        this.settingdays = in.readInt();
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        public User createFromParcel(Parcel source) {
            return new User(source);
        }

        public User[] newArray(int size) {
            return new User[size];
        }
    };
}
